cssvalue: Add class check to transition
authorTimm Bäder <mail@baedert.org>
Wed, 13 May 2020 06:06:51 +0000 (08:06 +0200)
committerTimm Bäder <mail@baedert.org>
Wed, 13 May 2020 06:07:55 +0000 (08:07 +0200)
In b25f93e24c78c639b4fd869d4e42ba9161781c12 we removed the code
comparing the transition functions, but we didn't add any other check
back.

Fixes #2740

gtk/gtkcssvalue.c

index b48f82a3c7578e0b251439fcd16b7688182b4f59..b5bcb913698ce3b4d3efc06356c100c87db4fc8d 100644 (file)
@@ -263,6 +263,9 @@ _gtk_css_value_transition (GtkCssValue *start,
   gtk_internal_return_val_if_fail (start != NULL, FALSE);
   gtk_internal_return_val_if_fail (end != NULL, FALSE);
 
+  if (start->class != end->class)
+    return NULL;
+
   if (progress == 0)
     return _gtk_css_value_ref (start);